<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="css/octicons.css">
    <link rel="stylesheet" href="css/github-gist.min.css">
    <link rel="stylesheet" href="css/style.css">
    <title>blog</title>

    <script src="js/marked.js"></script>
    <script src="js/highlight.pack.js"></script>

    <script src="js/config.js"></script>
    <script src="js/util.js"></script>
    <script src="js/app.js"></script>
</head>

<body>
    <body>

        <div id="home">
            <div id="container">
                <div id="blog_title"></div>
                <button id="new_page" onclick="newPage();"><span class="octicon octicon-plus"></span>新建</button>
                <div id="index">
                    <image id="wait" src="img/wait.gif" class="aligncenter"></image>
                    <ul id="post_list"></ul>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>

        <div id="page">
            <div id="container">
                <div id="header">
                    <div id="post-nav">
                        <a href="/">主页</a>
                    </div>
                </div>
                <div class="clearfix"></div>
                <div id="title"></div>
                <div id="content" class="markdown-body">
                    <image id="wait" src="img/wait.gif" class="aligncenter"></image>
                </div>
                <div id="comment">
                </div>
            </div>
        </div>

        <div id="footer"></div>
    </body>

    <script type="text/javascript">
        var p = loadPageVar("p");
        var filename = decodeURI(p);
        filename = filename.replace(/\/$/,"");
        var pagetitle = filename.replace(/^(\d+\.){7}/,"");
        pagetitle = pagetitle.replace(/\.md$/,"");
        if (filename && pagetitle) {
            hideElement("home");
            showElement("page");
            gotoPage(filename, pagetitle);
        } else {
            hideElement("page");
            showElement("home");
            gotoHome();
        }
    </script>
</body>

</html>
